﻿using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using MyCompanyName.AbpZeroTemplate.Organizations.Dto;
using System.Collections.Generic;
using System.Web.Http;

namespace MyCompanyName.AbpZeroTemplate.Organizations
{
    public interface IOrganizationUnitAppService : IApplicationService
    {
        Task<ListResultOutput<OrganizationUnitDto>> GetOrganizationUnits();


        Task<List<OrganizationTreeDto>> GetOrganizationTree();

        Task<List<GetOrganizationCheckedTree>> GetOrganizationUserTree([FromUri] int taskId, int projectId);


        List<KeyValuePair<long, string>> GetUsers(long? id, string userName);


        List<string> GetUserOrganizations(long userId);


        Task<PagedResultOutput<OrganizationUnitUserListDto>> GetOrganizationUnitUsers(GetOrganizationUnitUsersInput input);

        Task<List<OrganizationUnitUserListDto>> GetOrganizationUsers([FromUri] int organizationId);

        Task<OrganizationUnitDto> CreateOrganizationUnit(CreateOrganizationUnitInput input);

        Task<OrganizationUnitDto> UpdateOrganizationUnit(UpdateOrganizationUnitInput input);

        Task<OrganizationUnitDto> MoveOrganizationUnit(MoveOrganizationUnitInput input);

        Task DeleteOrganizationUnit(IdInput<long> input);

        Task AddUserToOrganizationUnit(UserToOrganizationUnitInput input);

        Task RemoveUserFromOrganizationUnit(UserToOrganizationUnitInput input);

        Task<bool> IsInOrganizationUnit(UserToOrganizationUnitInput input);
    }
}
